<?php
// *** Tangra (Application Framework and Tools for PHP)
//  $Id$
//


require_once(TANGRA_MAIN_DIR.'interfaces/i_db_recordset.class.php');

class ADODB_DB_Recordset extends Tangra_Class implements I_DB_Recordset {

	private $rs;

	function __construct(&$rs) {
		if ($rs instanceof ADORecordSet) {
			$this->rs = $rs;
		}
	}


	public function fetch_row() {
		$old_err_rep = error_reporting(SYSTEM_ERROR_REPORTING_PHP4_LIBS);
		$rez = $this->rs->FetchRow();
		error_reporting($old_err_rep);

		return $rez;
	}


	public function fetch_object() {
		$old_err_rep = error_reporting(SYSTEM_ERROR_REPORTING_PHP4_LIBS);
		$rez = $this->rs->FetchNextObject(true);
		error_reporting($old_err_rep);

		return $rez;
	}


	public function is_eof() {
		return $this->rs->EOF;
	}


	public function is_eod() {
		return $this->is_eof();
	}
	

	public function close() {
		$this->rs->Close();
	}
}

